home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_tcl80.idb / usr / freeware / include / tcl.h.z / tcl.h
Encoding:
C/C++ Source or Header  |  1999-04-16  |  59.4 KB  |  1,556 lines

  1. /*
  2.  * tcl.h --
  3.  *
  4.  *    This header file describes the externally-visible facilities
  5.  *    of the Tcl interpreter.
  6.  *
  7.  * Copyright (c) 1987-1994 The Regents of the University of California.
  8.  * Copyright (c) 1994-1997 Sun Microsystems, Inc.
  9.  * Copyright (c) 1993-1996 Lucent Technologies.
  10.  * Copyright (c) 1998 by Scriptics Corporation.
  11.  *
  12.  * See the file "license.terms" for information on usage and redistribution
  13.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14.  *
  15.  * RCS: @(#) $Id: tcl.h,v 1.29 1998/10/17 00:19:24 escoffon Exp $
  16.  */
  17.  
  18. #ifndef _TCL
  19. #define _TCL
  20.  
  21. /*
  22.  * When version numbers change here, must also go into the following files
  23.  * and update the version numbers:
  24.  *
  25.  * README
  26.  * library/init.tcl    (only if major.minor changes, not patchlevel)
  27.  * unix/configure.in
  28.  * win/makefile.bc    (only if major.minor changes, not patchlevel)
  29.  * win/makefile.vc    (only if major.minor changes, not patchlevel)
  30.  * win/README
  31.  * win/README.binary
  32.  *
  33.  * The release level should be  0 for alpha, 1 for beta, and 2 for
  34.  * final/patch.  The release serial value is the number that follows the
  35.  * "a", "b", or "p" in the patch level; for example, if the patch level
  36.  * is 7.6b2, TCL_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
  37.  * release level is changed, except for the final release which is 0
  38.  * (the first patch will start at 1).
  39.  */
  40.  
  41. #define TCL_MAJOR_VERSION   8
  42. #define TCL_MINOR_VERSION   0
  43. #define TCL_RELEASE_LEVEL   2
  44. #define TCL_RELEASE_SERIAL  4
  45.  
  46. #define TCL_VERSION        "8.0"
  47. #define TCL_PATCH_LEVEL        "8.0.4"
  48.  
  49. /*
  50.  * The following definitions set up the proper options for Windows
  51.  * compilers.  We use this method because there is no autoconf equivalent.
  52.  */
  53.  
  54. #ifndef __WIN32__
  55. #   if defined(_WIN32) || defined(WIN32)
  56. #    define __WIN32__
  57. #   endif
  58. #endif
  59.  
  60. #ifdef __WIN32__
  61. #   ifndef STRICT
  62. #    define STRICT
  63. #   endif
  64. #   ifndef USE_PROTOTYPE
  65. #    define USE_PROTOTYPE 1
  66. #   endif
  67. #   ifndef HAS_STDARG
  68. #    define HAS_STDARG 1
  69. #   endif
  70. #   ifndef USE_PROTOTYPE
  71. #    define USE_PROTOTYPE 1
  72. #   endif
  73. #   ifndef USE_TCLALLOC
  74. #    define USE_TCLALLOC 1
  75. #   endif
  76. #endif /* __WIN32__ */
  77.  
  78. /*
  79.  * The following definitions set up the proper options for Macintosh
  80.  * compilers.  We use this method because there is no autoconf equivalent.
  81.  */
  82.  
  83. #ifdef MAC_TCL
  84. #   ifndef HAS_STDARG
  85. #    define HAS_STDARG 1
  86. #   endif
  87. #   ifndef USE_TCLALLOC
  88. #    define USE_TCLALLOC 1
  89. #   endif
  90. #   ifndef NO_STRERROR
  91. #    define NO_STRERROR 1
  92. #   endif
  93. #endif
  94.  
  95. /*
  96.  * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
  97.  * quotation marks), JOIN joins two arguments.
  98.  */
  99.  
  100. #define VERBATIM(x) x
  101. #ifdef _MSC_VER
  102. # define STRINGIFY(x) STRINGIFY1(x)
  103. # define STRINGIFY1(x) #x
  104. # define JOIN(a,b) JOIN1(a,b)
  105. # define JOIN1(a,b) a##b
  106. #else
  107. # ifdef RESOURCE_INCLUDED
  108. #  define STRINGIFY(x) STRINGIFY1(x)
  109. #  define STRINGIFY1(x) #x
  110. #  define JOIN(a,b) JOIN1(a,b)
  111. #  define JOIN1(a,b) a##b
  112. # else
  113. #  ifdef __STDC__
  114. #   define STRINGIFY(x) #x
  115. #   define JOIN(a,b) a##b
  116. #  else
  117. #   define STRINGIFY(x) "x"
  118. #   define JOIN(a,b) VERBATIM(a)VERBATIM(b)
  119. #  endif
  120. # endif
  121. #endif
  122.  
  123. /* 
  124.  * A special definition used to allow this header file to be included 
  125.  * in resource files so that they can get obtain version information from
  126.  * this file.  Resource compilers don't like all the C stuff, like typedefs
  127.  * and procedure declarations, that occur below.
  128.  */
  129.  
  130. #ifndef RESOURCE_INCLUDED
  131.  
  132. #ifndef BUFSIZ
  133. #include <stdio.h>
  134. #endif
  135.  
  136. /*
  137.  * Definitions that allow Tcl functions with variable numbers of
  138.  * arguments to be used with either varargs.h or stdarg.h.  TCL_VARARGS
  139.  * is used in procedure prototypes.  TCL_VARARGS_DEF is used to declare
  140.  * the arguments in a function definiton: it takes the type and name of
  141.  * the first argument and supplies the appropriate argument declaration
  142.  * string for use in the function definition.  TCL_VARARGS_START
  143.  * initializes the va_list data structure and returns the first argument.
  144.  */
  145.  
  146. #if defined(__STDC__) || defined(HAS_STDARG)
  147. #   define TCL_VARARGS(type, name) (type name, ...)
  148. #   define TCL_VARARGS_DEF(type, name) (type name, ...)
  149. #   define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
  150. #else
  151. #   ifdef __cplusplus
  152. #    define TCL_VARARGS(type, name) (type name, ...)
  153. #    define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
  154. #   else
  155. #    define TCL_VARARGS(type, name) ()
  156. #    define TCL_VARARGS_DEF(type, name) (va_alist)
  157. #   endif
  158. #   define TCL_VARARGS_START(type, name, list) \
  159.     (va_start(list), va_arg(list, type))
  160. #endif
  161.  
  162. /*
  163.  * Macros used to declare a function to be exported by a DLL.
  164.  * Used by Windows, maps to no-op declarations on non-Windows systems.
  165.  * The default build on windows is for a DLL, which causes the DLLIMPORT
  166.  * and DLLEXPORT macros to be nonempty. To build a static library, the
  167.  * macro STATIC_BUILD should be defined.
  168.  * The support follows the convention that a macro called BUILD_xxxx, where
  169.  * xxxx is the name of a library we are building, is set on the compile line
  170.  * for sources that are to be placed in the library. See BUILD_tcl in this
  171.  * file for an example of how the macro is to be used.
  172.  */
  173.  
  174. #ifdef __WIN32__
  175. # ifdef STATIC_BUILD
  176. #  define DLLIMPORT
  177. #  define DLLEXPORT
  178. # else
  179. #  ifdef _MSC_VER
  180. #   define DLLIMPORT __declspec(dllimport)
  181. #   define DLLEXPORT __declspec(dllexport)
  182. #  else
  183. #   define DLLIMPORT
  184. #   define DLLEXPORT
  185. #  endif
  186. # endif
  187. #else
  188. # define DLLIMPORT
  189. # define DLLEXPORT
  190. #endif
  191.  
  192. #ifdef TCL_STORAGE_CLASS
  193. # undef TCL_STORAGE_CLASS
  194. #endif
  195. #ifdef BUILD_tcl
  196. # define TCL_STORAGE_CLASS DLLEXPORT
  197. #else
  198. # define TCL_STORAGE_CLASS DLLIMPORT
  199. #endif
  200.  
  201. /*
  202.  * Definitions that allow this header file to be used either with or
  203.  * without ANSI C features like function prototypes.
  204.  */
  205.  
  206. #undef _ANSI_ARGS_
  207. #undef CONST
  208.  
  209. #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
  210. #   define _USING_PROTOTYPES_ 1
  211. #   define _ANSI_ARGS_(x)    x
  212. #   define CONST const
  213. #else
  214. #   define _ANSI_ARGS_(x)    ()
  215. #   define CONST
  216. #endif
  217.  
  218. #ifdef __cplusplus
  219. #   define EXTERN extern "C" TCL_STORAGE_CLASS
  220. #else
  221. #   define EXTERN extern TCL_STORAGE_CLASS
  222. #endif
  223.  
  224. /*
  225.  * Macro to use instead of "void" for arguments that must have
  226.  * type "void *" in ANSI C;  maps them to type "char *" in
  227.  * non-ANSI systems.
  228.  */
  229. #ifndef __WIN32__
  230. #ifndef VOID
  231. #   ifdef __STDC__
  232. #       define VOID void
  233. #   else
  234. #       define VOID char
  235. #   endif
  236. #endif
  237. #else /* __WIN32__ */
  238. /*
  239.  * The following code is copied from winnt.h
  240.  */
  241. #ifndef VOID
  242. #define VOID void
  243. typedef char CHAR;
  244. typedef short SHORT;
  245. typedef long LONG;
  246. #endif
  247. #endif /* __WIN32__ */
  248.  
  249. /*
  250.  * Miscellaneous declarations.
  251.  */
  252.  
  253. #ifndef NULL
  254. #define NULL 0
  255. #endif
  256.  
  257. #ifndef _CLIENTDATA
  258. #   if defined(__STDC__) || defined(__cplusplus)
  259.     typedef void *ClientData;
  260. #   else
  261.     typedef int *ClientData;
  262. #   endif /* __STDC__ */
  263. #define _CLIENTDATA
  264. #endif
  265.  
  266. /*
  267.  * Data structures defined opaquely in this module. The definitions below
  268.  * just provide dummy types. A few fields are made visible in Tcl_Interp
  269.  * structures, namely those used for returning a string result from
  270.  * commands. Direct access to the result field is discouraged in Tcl 8.0.
  271.  * The interpreter result is either an object or a string, and the two
  272.  * values are kept consistent unless some C code sets interp->result
  273.  * directly. Programmers should use either the procedure Tcl_GetObjResult()
  274.  * or Tcl_GetStringResult() to read the interpreter's result. See the
  275.  * SetResult man page for details.
  276.  * 
  277.  * Note: any change to the Tcl_Interp definition below must be mirrored
  278.  * in the "real" definition in tclInt.h.
  279.  *
  280.  * Note: Tcl_ObjCmdProc procedures do not directly set result and freeProc.
  281.  * Instead, they set a Tcl_Obj member in the "real" structure that can be
  282.  * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
  283.  */
  284.  
  285. typedef struct Tcl_Interp {
  286.     char *result;        /* If the last command returned a string
  287.                  * result, this points to it. */
  288.     void (*freeProc) _ANSI_ARGS_((char *blockPtr));
  289.                 /* Zero means the string result is
  290.                  * statically allocated. TCL_DYNAMIC means
  291.                  * it was allocated with ckalloc and should
  292.                  * be freed with ckfree. Other values give
  293.                  * the address of procedure to invoke to
  294.                  * free the result. Tcl_Eval must free it
  295.                  * before executing next command. */
  296.     int errorLine;              /* When TCL_ERROR is returned, this gives
  297.                                  * the line number within the command where
  298.                                  * the error occurred (1 if first line). */
  299. } Tcl_Interp;
  300.  
  301. typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
  302. typedef struct Tcl_Channel_ *Tcl_Channel;
  303. typedef struct Tcl_Command_ *Tcl_Command;
  304. typedef struct Tcl_Event Tcl_Event;
  305. typedef struct Tcl_Pid_ *Tcl_Pid;
  306. typedef struct Tcl_RegExp_ *Tcl_RegExp;
  307. typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
  308. typedef struct Tcl_Trace_ *Tcl_Trace;
  309. typedef struct Tcl_Var_ *Tcl_Var;
  310.  
  311. /*
  312.  * When a TCL command returns, the interpreter contains a result from the
  313.  * command. Programmers are strongly encouraged to use one of the
  314.  * procedures Tcl_GetObjResult() or Tcl_GetStringResult() to read the
  315.  * interpreter's result. See the SetResult man page for details. Besides
  316.  * this result, the command procedure returns an integer code, which is 
  317.  * one of the following:
  318.  *
  319.  * TCL_OK        Command completed normally; the interpreter's
  320.  *            result contains    the command's result.
  321.  * TCL_ERROR        The command couldn't be completed successfully;
  322.  *            the interpreter's result describes what went wrong.
  323.  * TCL_RETURN        The command requests that the current procedure
  324.  *            return; the interpreter's result contains the
  325.  *            procedure's return value.
  326.  * TCL_BREAK        The command requests that the innermost loop
  327.  *            be exited; the interpreter's result is meaningless.
  328.  * TCL_CONTINUE        Go on to the next iteration of the current loop;
  329.  *            the interpreter's result is meaningless.
  330.  */
  331.  
  332. #define TCL_OK        0
  333. #define TCL_ERROR    1
  334. #define TCL_RETURN    2
  335. #define TCL_BREAK    3
  336. #define TCL_CONTINUE    4
  337.  
  338. #define TCL_RESULT_SIZE 200
  339.  
  340. /*
  341.  * Argument descriptors for math function callbacks in expressions:
  342.  */
  343.  
  344. typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
  345. typedef struct Tcl_Value {
  346.     Tcl_ValueType type;        /* Indicates intValue or doubleValue is
  347.                  * valid, or both. */
  348.     long intValue;        /* Integer value. */
  349.     double doubleValue;        /* Double-precision floating value. */
  350. } Tcl_Value;
  351.  
  352. /*
  353.  * Forward declaration of Tcl_Obj to prevent an error when the forward
  354.  * reference to Tcl_Obj is encountered in the procedure types declared 
  355.  * below.
  356.  */
  357.  
  358. struct Tcl_Obj;
  359.  
  360. /*
  361.  * Procedure types defined by Tcl:
  362.  */
  363.  
  364. typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  365. typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
  366.     Tcl_Interp *interp, int code));
  367. typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
  368. typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
  369. typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
  370. typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
  371.     Tcl_Interp *interp, int argc, char *argv[]));
  372. typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
  373.     Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
  374.     ClientData cmdClientData, int argc, char *argv[]));
  375. typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr, 
  376.         struct Tcl_Obj *dupPtr));
  377. typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
  378. typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
  379.     int flags));
  380. typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
  381.         ClientData clientData));
  382. typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
  383.     int flags));
  384. typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
  385. typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
  386. typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
  387. typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
  388. typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
  389. typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
  390. typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
  391.     Tcl_Interp *interp));
  392. typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
  393.     Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
  394. typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
  395. typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
  396.     Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
  397. typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  398. typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
  399.         Tcl_Channel chan, char *address, int port));
  400. typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
  401. typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp,
  402.     struct Tcl_Obj *objPtr));
  403. typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
  404. typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
  405.     Tcl_Interp *interp, char *part1, char *part2, int flags));
  406.  
  407. /*
  408.  * The following structure represents a type of object, which is a
  409.  * particular internal representation for an object plus a set of
  410.  * procedures that provide standard operations on objects of that type.
  411.  */
  412.  
  413. typedef struct Tcl_ObjType {
  414.     char *name;            /* Name of the type, e.g. "int". */
  415.     Tcl_FreeInternalRepProc *freeIntRepProc;
  416.                 /* Called to free any storage for the type's
  417.                  * internal rep. NULL if the internal rep
  418.                  * does not need freeing. */
  419.     Tcl_DupInternalRepProc *dupIntRepProc;
  420.                     /* Called to create a new object as a copy
  421.                  * of an existing object. */
  422.     Tcl_UpdateStringProc *updateStringProc;
  423.                     /* Called to update the string rep from the
  424.                  * type's internal representation. */
  425.     Tcl_SetFromAnyProc *setFromAnyProc;
  426.                     /* Called to convert the object's internal
  427.                  * rep to this type. Frees the internal rep
  428.                  * of the old type. Returns TCL_ERROR on
  429.                  * failure. */
  430. } Tcl_ObjType;
  431.  
  432. /*
  433.  * One of the following structures exists for each object in the Tcl
  434.  * system. An object stores a value as either a string, some internal
  435.  * representation, or both.
  436.  */
  437.  
  438. typedef struct Tcl_Obj {
  439.     int refCount;        /* When 0 the object will be freed. */
  440.     char *bytes;        /* This points to the first byte of the
  441.                  * object's string representation. The array
  442.                  * must be followed by a null byte (i.e., at
  443.                  * offset length) but may also contain
  444.                  * embedded null characters. The array's
  445.                  * storage is allocated by ckalloc. NULL
  446.                  * means the string rep is invalid and must
  447.                  * be regenerated from the internal rep.
  448.                  * Clients should use Tcl_GetStringFromObj
  449.                  * to get a pointer to the byte array as a
  450.                  * readonly value. */
  451.     int length;            /* The number of bytes at *bytes, not
  452.                  * including the terminating null. */
  453.     Tcl_ObjType *typePtr;    /* Denotes the object's type. Always
  454.                  * corresponds to the type of the object's
  455.                  * internal rep. NULL indicates the object
  456.                  * has no internal rep (has no type). */
  457.     union {            /* The internal representation: */
  458.     long longValue;        /*   - an long integer value */
  459.     double doubleValue;    /*   - a double-precision floating value */
  460.     VOID *otherValuePtr;    /*   - another, type-specific value */
  461.     struct {        /*   - internal rep as two pointers */
  462.         VOID *ptr1;
  463.         VOID *ptr2;
  464.     } twoPtrValue;
  465.     } internalRep;
  466. } Tcl_Obj;
  467.  
  468. /*
  469.  * Macros to increment and decrement a Tcl_Obj's reference count, and to
  470.  * test whether an object is shared (i.e. has reference count > 1).
  471.  * Note: clients should use Tcl_DecrRefCount() when they are finished using
  472.  * an object, and should never call TclFreeObj() directly. TclFreeObj() is
  473.  * only defined and made public in tcl.h to support Tcl_DecrRefCount's macro
  474.  * definition. Note also that Tcl_DecrRefCount() refers to the parameter
  475.  * "obj" twice. This means that you should avoid calling it with an
  476.  * expression that is expensive to compute or has side effects.
  477.  */
  478.  
  479. EXTERN void        Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
  480. EXTERN void        Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
  481. EXTERN int        Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
  482.  
  483. #ifdef TCL_MEM_DEBUG
  484. #   define Tcl_IncrRefCount(objPtr) \
  485.     Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
  486. #   define Tcl_DecrRefCount(objPtr) \
  487.     Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
  488. #   define Tcl_IsShared(objPtr) \
  489.     Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
  490. #else
  491. #   define Tcl_IncrRefCount(objPtr) \
  492.     ++(objPtr)->refCount
  493. #   define Tcl_DecrRefCount(objPtr) \
  494.     if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)
  495. #   define Tcl_IsShared(objPtr) \
  496.     ((objPtr)->refCount > 1)
  497. #endif
  498.  
  499. /*
  500.  * Macros and definitions that help to debug the use of Tcl objects.
  501.  * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are 
  502.  * overridden to call debugging versions of the object creation procedures.
  503.  */
  504.  
  505. EXTERN Tcl_Obj *    Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
  506. EXTERN Tcl_Obj *    Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
  507. EXTERN Tcl_Obj *    Tcl_NewIntObj _ANSI_ARGS_((int intValue));
  508. EXTERN Tcl_Obj *    Tcl_NewListObj _ANSI_ARGS_((int objc,
  509.                 Tcl_Obj *CONST objv[]));
  510. EXTERN Tcl_Obj *    Tcl_NewLongObj _ANSI_ARGS_((long longValue));
  511. EXTERN Tcl_Obj *    Tcl_NewObj _ANSI_ARGS_((void));
  512. EXTERN Tcl_Obj *    Tcl_NewStringObj _ANSI_ARGS_((char *bytes,
  513.                 int length));
  514.  
  515. #ifdef TCL_MEM_DEBUG
  516. #  define Tcl_NewBooleanObj(val) \
  517.      Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
  518. #  define Tcl_NewDoubleObj(val) \
  519.      Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
  520. #  define Tcl_NewIntObj(val) \
  521.      Tcl_DbNewLongObj(val, __FILE__, __LINE__)
  522. #  define Tcl_NewListObj(objc, objv) \
  523.      Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
  524. #  define Tcl_NewLongObj(val) \
  525.      Tcl_DbNewLongObj(val, __FILE__, __LINE__)
  526. #  define Tcl_NewObj() \
  527.      Tcl_DbNewObj(__FILE__, __LINE__)
  528. #  define Tcl_NewStringObj(bytes, len) \
  529.      Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
  530. #endif /* TCL_MEM_DEBUG */
  531.  
  532. /*
  533.  * The following definitions support Tcl's namespace facility.
  534.  * Note: the first five fields must match exactly the fields in a
  535.  * Namespace structure (see tcl.h). 
  536.  */
  537.  
  538. typedef struct Tcl_Namespace {
  539.     char *name;                 /* The namespace's name within its parent
  540.                  * namespace. This contains no ::'s. The
  541.                  * name of the global namespace is ""
  542.                  * although "::" is an synonym. */
  543.     char *fullName;             /* The namespace's fully qualified name.
  544.                  * This starts with ::. */
  545.     ClientData clientData;      /* Arbitrary value associated with this
  546.                  * namespace. */
  547.     Tcl_NamespaceDeleteProc* deleteProc;
  548.                                 /* Procedure invoked when deleting the
  549.                  * namespace to, e.g., free clientData. */
  550.     struct Tcl_Namespace* parentPtr;
  551.                                 /* Points to the namespace that contains
  552.                  * this one. NULL if this is the global
  553.                  * namespace. */
  554. } Tcl_Namespace;
  555.  
  556. /*
  557.  * The following structure represents a call frame, or activation record.
  558.  * A call frame defines a naming context for a procedure call: its local
  559.  * scope (for local variables) and its namespace scope (used for non-local
  560.  * variables; often the global :: namespace). A call frame can also define
  561.  * the naming context for a namespace eval or namespace inscope command:
  562.  * the namespace in which the command's code should execute. The
  563.  * Tcl_CallFrame structures exist only while procedures or namespace
  564.  * eval/inscope's are being executed, and provide a Tcl call stack.
  565.  * 
  566.  * A call frame is initialized and pushed using Tcl_PushCallFrame and
  567.  * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
  568.  * provided by the Tcl_PushCallFrame caller, and callers typically allocate
  569.  * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
  570.  * is defined as a structure and not as an opaque token. However, most
  571.  * Tcl_CallFrame fields are hidden since applications should not access
  572.  * them directly; others are declared as "dummyX".
  573.  *
  574.  * WARNING!! The structure definition must be kept consistent with the
  575.  * CallFrame structure in tclInt.h. If you change one, change the other.
  576.  */
  577.  
  578. typedef struct Tcl_CallFrame {
  579.     Tcl_Namespace *nsPtr;
  580.     int dummy1;
  581.     int dummy2;
  582.     char *dummy3;
  583.     char *dummy4;
  584.     char *dummy5;
  585.     int dummy6;
  586.     char *dummy7;
  587.     char *dummy8;
  588.     int dummy9;
  589.     char* dummy10;
  590. } Tcl_CallFrame;
  591.  
  592. /*
  593.  * Information about commands that is returned by Tcl_GetCommandInfo and
  594.  * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based
  595.  * command procedure while proc is a traditional Tcl argc/argv
  596.  * string-based procedure. Tcl_CreateObjCommand and Tcl_CreateCommand
  597.  * ensure that both objProc and proc are non-NULL and can be called to
  598.  * execute the command. However, it may be faster to call one instead of
  599.  * the other. The member isNativeObjectProc is set to 1 if an
  600.  * object-based procedure was registered by Tcl_CreateObjCommand, and to
  601.  * 0 if a string-based procedure was registered by Tcl_CreateCommand.
  602.  * The other procedure is typically set to a compatibility wrapper that
  603.  * does string-to-object or object-to-string argument conversions then
  604.  * calls the other procedure.
  605.  */
  606.      
  607. typedef struct Tcl_CmdInfo {
  608.     int isNativeObjectProc;     /* 1 if objProc was registered by a call to
  609.                   * Tcl_CreateObjCommand; 0 otherwise.
  610.                   * Tcl_SetCmdInfo does not modify this
  611.                   * field. */
  612.     Tcl_ObjCmdProc *objProc;     /* Command's object-based procedure. */
  613.     ClientData objClientData;     /* ClientData for object proc. */
  614.     Tcl_CmdProc *proc;         /* Command's string-based procedure. */
  615.     ClientData clientData;     /* ClientData for string proc. */
  616.     Tcl_CmdDeleteProc *deleteProc;
  617.                                  /* Procedure to call when command is
  618.                                   * deleted. */
  619.     ClientData deleteData;     /* Value to pass to deleteProc (usually
  620.                   * the same as clientData). */
  621.     Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
  622.                   * this command. Note that Tcl_SetCmdInfo
  623.                   * will not change a command's namespace;
  624.                   * use Tcl_RenameCommand to do that. */
  625.  
  626. } Tcl_CmdInfo;
  627.  
  628. /*
  629.  * The structure defined below is used to hold dynamic strings.  The only
  630.  * field that clients should use is the string field, and they should
  631.  * never modify it.
  632.  */
  633.  
  634. #define TCL_DSTRING_STATIC_SIZE 200
  635. typedef struct Tcl_DString {
  636.     char *string;        /* Points to beginning of string:  either
  637.                  * staticSpace below or a malloced array. */
  638.     int length;            /* Number of non-NULL characters in the
  639.                  * string. */
  640.     int spaceAvl;        /* Total number of bytes available for the
  641.                  * string and its terminating NULL char. */
  642.     char staticSpace[TCL_DSTRING_STATIC_SIZE];
  643.                 /* Space to use in common case where string
  644.                  * is small. */
  645. } Tcl_DString;
  646.  
  647. #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
  648. #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
  649. #define Tcl_DStringTrunc Tcl_DStringSetLength
  650.  
  651. /*
  652.  * Definitions for the maximum number of digits of precision that may
  653.  * be specified in the "tcl_precision" variable, and the number of
  654.  * characters of buffer space required by Tcl_PrintDouble.
  655.  */
  656.  
  657. #define TCL_MAX_PREC 17
  658. #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
  659.  
  660. /*
  661.  * Flag that may be passed to Tcl_ConvertElement to force it not to
  662.  * output braces (careful!  if you change this flag be sure to change
  663.  * the definitions at the front of tclUtil.c).
  664.  */
  665.  
  666. #define TCL_DONT_USE_BRACES    1
  667.  
  668. /*
  669.  * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
  670.  * abbreviated strings.
  671.  */
  672.  
  673. #define TCL_EXACT    1
  674.  
  675. /*
  676.  * Flag values passed to Tcl_RecordAndEval.
  677.  * WARNING: these bit choices must not conflict with the bit choices
  678.  * for evalFlag bits in tclInt.h!!
  679.  */
  680.  
  681. #define TCL_NO_EVAL        0x10000
  682. #define TCL_EVAL_GLOBAL        0x20000
  683.  
  684. /*
  685.  * Special freeProc values that may be passed to Tcl_SetResult (see
  686.  * the man page for details):
  687.  */
  688.  
  689. #define TCL_VOLATILE    ((Tcl_FreeProc *) 1)
  690. #define TCL_STATIC    ((Tcl_FreeProc *) 0)
  691. #define TCL_DYNAMIC    ((Tcl_FreeProc *) 3)
  692.  
  693. /*
  694.  * Flag values passed to variable-related procedures.
  695.  */
  696.  
  697. #define TCL_GLOBAL_ONLY         1
  698. #define TCL_NAMESPACE_ONLY     2
  699. #define TCL_APPEND_VALUE     4
  700. #define TCL_LIST_ELEMENT     8
  701. #define TCL_TRACE_READS         0x10
  702. #define TCL_TRACE_WRITES     0x20
  703. #define TCL_TRACE_UNSETS     0x40
  704. #define TCL_TRACE_DESTROYED     0x80
  705. #define TCL_INTERP_DESTROYED     0x100
  706. #define TCL_LEAVE_ERR_MSG     0x200
  707. #define TCL_PARSE_PART1         0x400
  708.  
  709. /*
  710.  * Types for linked variables:
  711.  */
  712.  
  713. #define TCL_LINK_INT        1
  714. #define TCL_LINK_DOUBLE        2
  715. #define TCL_LINK_BOOLEAN    3
  716. #define TCL_LINK_STRING        4
  717. #define TCL_LINK_READ_ONLY    0x80
  718.  
  719. /*
  720.  * The following declarations either map ckalloc and ckfree to
  721.  * malloc and free, or they map them to procedures with all sorts
  722.  * of debugging hooks defined in tclCkalloc.c.
  723.  */
  724.  
  725. EXTERN char *        Tcl_Alloc _ANSI_ARGS_((unsigned int size));
  726. EXTERN void        Tcl_Free _ANSI_ARGS_((char *ptr));
  727. EXTERN char *        Tcl_Realloc _ANSI_ARGS_((char *ptr,
  728.                 unsigned int size));
  729.  
  730. #ifdef TCL_MEM_DEBUG
  731.  
  732. #  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  733. #  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  734. #  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  735. #  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  736. #  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  737. #  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  738.  
  739. EXTERN int        Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
  740. EXTERN void        Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
  741.                 int line));
  742.  
  743. #else
  744.  
  745. #  if USE_TCLALLOC
  746. #     define ckalloc(x) Tcl_Alloc(x)
  747. #     define ckfree(x) Tcl_Free(x)
  748. #     define ckrealloc(x,y) Tcl_Realloc(x,y)
  749. #  else
  750. #     define ckalloc(x) malloc(x)
  751. #     define ckfree(x)  free(x)
  752. #     define ckrealloc(x,y) realloc(x,y)
  753. #  endif
  754. #  define Tcl_DumpActiveMemory(x)
  755. #  define Tcl_ValidateAllMemory(x,y)
  756.  
  757. #endif /* TCL_MEM_DEBUG */
  758.  
  759. /*
  760.  * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
  761.  * to prevent errors when the forward reference to Tcl_HashTable is
  762.  * encountered in the Tcl_HashEntry structure.
  763.  */
  764.  
  765. #ifdef __cplusplus
  766. struct Tcl_HashTable;
  767. #endif
  768.  
  769. /*
  770.  * Structure definition for an entry in a hash table.  No-one outside
  771.  * Tcl should access any of these fields directly;  use the macros
  772.  * defined below.
  773.  */
  774.  
  775. typedef struct Tcl_HashEntry {
  776.     struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
  777.                      * hash bucket, or NULL for end of
  778.                      * chain. */
  779.     struct Tcl_HashTable *tablePtr;    /* Pointer to table containing entry. */
  780.     struct Tcl_HashEntry **bucketPtr;    /* Pointer to bucket that points to
  781.                      * first entry in this entry's chain:
  782.                      * used for deleting the entry. */
  783.     ClientData clientData;        /* Application stores something here
  784.                      * with Tcl_SetHashValue. */
  785.     union {                /* Key has one of these forms: */
  786.     char *oneWordValue;        /* One-word value for key. */
  787.     int words[1];            /* Multiple integer words for key.
  788.                      * The actual size will be as large
  789.                      * as necessary for this table's
  790.                      * keys. */
  791.     char string[4];            /* String for key.  The actual size
  792.                      * will be as large as needed to hold
  793.                      * the key. */
  794.     } key;                /* MUST BE LAST FIELD IN RECORD!! */
  795. } Tcl_HashEntry;
  796.  
  797. /*
  798.  * Structure definition for a hash table.  Must be in tcl.h so clients
  799.  * can allocate space for these structures, but clients should never
  800.  * access any fields in this structure.
  801.  */
  802.  
  803. #define TCL_SMALL_HASH_TABLE 4
  804. typedef struct Tcl_HashTable {
  805.     Tcl_HashEntry **buckets;        /* Pointer to bucket array.  Each
  806.                      * element points to first entry in
  807.                      * bucket's hash chain, or NULL. */
  808.     Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
  809.                     /* Bucket array used for small tables
  810.                      * (to avoid mallocs and frees). */
  811.     int numBuckets;            /* Total number of buckets allocated
  812.                      * at **bucketPtr. */
  813.     int numEntries;            /* Total number of entries present
  814.                      * in table. */
  815.     int rebuildSize;            /* Enlarge table when numEntries gets
  816.                      * to be this large. */
  817.     int downShift;            /* Shift count used in hashing
  818.                      * function.  Designed to use high-
  819.                      * order bits of randomized keys. */
  820.     int mask;                /* Mask value used in hashing
  821.                      * function. */
  822.     int keyType;            /* Type of keys used in this table. 
  823.                      * It's either TCL_STRING_KEYS,
  824.                      * TCL_ONE_WORD_KEYS, or an integer
  825.                      * giving the number of ints that
  826.                                          * is the size of the key.
  827.                      */
  828.     Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  829.         CONST char *key));
  830.     Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  831.         CONST char *key, int *newPtr));
  832. } Tcl_HashTable;
  833.  
  834. /*
  835.  * Structure definition for information used to keep track of searches
  836.  * through hash tables:
  837.  */
  838.  
  839. typedef struct Tcl_HashSearch {
  840.     Tcl_HashTable *tablePtr;        /* Table being searched. */
  841.     int nextIndex;            /* Index of next bucket to be
  842.                      * enumerated after present one. */
  843.     Tcl_HashEntry *nextEntryPtr;    /* Next entry to be enumerated in the
  844.                      * the current bucket. */
  845. } Tcl_HashSearch;
  846.  
  847. /*
  848.  * Acceptable key types for hash tables:
  849.  */
  850.  
  851. #define TCL_STRING_KEYS        0
  852. #define TCL_ONE_WORD_KEYS    1
  853.  
  854. /*
  855.  * Macros for clients to use to access fields of hash entries:
  856.  */
  857.  
  858. #define Tcl_GetHashValue(h) ((h)->clientData)
  859. #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
  860. #define Tcl_GetHashKey(tablePtr, h) \
  861.     ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
  862.                         : (h)->key.string))
  863.  
  864. /*
  865.  * Macros to use for clients to use to invoke find and create procedures
  866.  * for hash tables:
  867.  */
  868.  
  869. #define Tcl_FindHashEntry(tablePtr, key) \
  870.     (*((tablePtr)->findProc))(tablePtr, key)
  871. #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
  872.     (*((tablePtr)->createProc))(tablePtr, key, newPtr)
  873.  
  874. /*
  875.  * Flag values to pass to Tcl_DoOneEvent to disable searches
  876.  * for some kinds of events:
  877.  */
  878.  
  879. #define TCL_DONT_WAIT        (1<<1)
  880. #define TCL_WINDOW_EVENTS    (1<<2)
  881. #define TCL_FILE_EVENTS        (1<<3)
  882. #define TCL_TIMER_EVENTS    (1<<4)
  883. #define TCL_IDLE_EVENTS        (1<<5)    /* WAS 0x10 ???? */
  884. #define TCL_ALL_EVENTS        (~TCL_DONT_WAIT)
  885.  
  886. /*
  887.  * The following structure defines a generic event for the Tcl event
  888.  * system.  These are the things that are queued in calls to Tcl_QueueEvent
  889.  * and serviced later by Tcl_DoOneEvent.  There can be many different
  890.  * kinds of events with different fields, corresponding to window events,
  891.  * timer events, etc.  The structure for a particular event consists of
  892.  * a Tcl_Event header followed by additional information specific to that
  893.  * event.
  894.  */
  895.  
  896. struct Tcl_Event {
  897.     Tcl_EventProc *proc;    /* Procedure to call to service this event. */
  898.     struct Tcl_Event *nextPtr;    /* Next in list of pending events, or NULL. */
  899. };
  900.  
  901. /*
  902.  * Positions to pass to Tcl_QueueEvent:
  903.  */
  904.  
  905. typedef enum {
  906.     TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
  907. } Tcl_QueuePosition;
  908.  
  909. /*
  910.  * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
  911.  * event routines.
  912.  */
  913.  
  914. #define TCL_SERVICE_NONE 0
  915. #define TCL_SERVICE_ALL 1
  916.  
  917. /*
  918.  * The following structure keeps is used to hold a time value, either as
  919.  * an absolute time (the number of seconds from the epoch) or as an
  920.  * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
  921.  * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
  922.  */
  923.  
  924. typedef struct Tcl_Time {
  925.     long sec;            /* Seconds. */
  926.     long usec;            /* Microseconds. */
  927. } Tcl_Time;
  928.  
  929. /*
  930.  * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
  931.  * to indicate what sorts of events are of interest:
  932.  */
  933.  
  934. #define TCL_READABLE    (1<<1)
  935. #define TCL_WRITABLE    (1<<2)
  936. #define TCL_EXCEPTION    (1<<3)
  937.  
  938. /*
  939.  * Flag values to pass to Tcl_OpenCommandChannel to indicate the
  940.  * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
  941.  * are also used in Tcl_GetStdChannel.
  942.  */
  943.  
  944. #define TCL_STDIN        (1<<1)    
  945. #define TCL_STDOUT        (1<<2)
  946. #define TCL_STDERR        (1<<3)
  947. #define TCL_ENFORCE_MODE    (1<<4)
  948.  
  949. /*
  950.  * Typedefs for the various operations in a channel type:
  951.  */
  952.  
  953. typedef int    (Tcl_DriverBlockModeProc) _ANSI_ARGS_((
  954.             ClientData instanceData, int mode));
  955. typedef int    (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
  956.             Tcl_Interp *interp));
  957. typedef int    (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
  958.             char *buf, int toRead, int *errorCodePtr));
  959. typedef int    (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
  960.             char *buf, int toWrite, int *errorCodePtr));
  961. typedef int    (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
  962.             long offset, int mode, int *errorCodePtr));
  963. typedef int    (Tcl_DriverSetOptionProc) _ANSI_ARGS_((
  964.             ClientData instanceData, Tcl_Interp *interp,
  965.                 char *optionName, char *value));
  966. typedef int    (Tcl_DriverGetOptionProc) _ANSI_ARGS_((
  967.             ClientData instanceData, Tcl_Interp *interp,
  968.             char *optionName, Tcl_DString *dsPtr));
  969. typedef void    (Tcl_DriverWatchProc) _ANSI_ARGS_((
  970.             ClientData instanceData, int mask));
  971. typedef int    (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
  972.             ClientData instanceData, int direction,
  973.             ClientData *handlePtr));
  974.  
  975. /*
  976.  * Enum for different end of line translation and recognition modes.
  977.  */
  978.  
  979. typedef enum Tcl_EolTranslation {
  980.     TCL_TRANSLATE_AUTO,            /* Eol == \r, \n and \r\n. */
  981.     TCL_TRANSLATE_CR,            /* Eol == \r. */
  982.     TCL_TRANSLATE_LF,            /* Eol == \n. */
  983.     TCL_TRANSLATE_CRLF            /* Eol == \r\n. */
  984. } Tcl_EolTranslation;
  985.  
  986. /*
  987.  * struct Tcl_ChannelType:
  988.  *
  989.  * One such structure exists for each type (kind) of channel.
  990.  * It collects together in one place all the functions that are
  991.  * part of the specific channel type.
  992.  */
  993.  
  994. typedef struct Tcl_ChannelType {
  995.     char *typeName;            /* The name of the channel type in Tcl
  996.                                          * commands. This storage is owned by
  997.                                          * channel type. */
  998.     Tcl_DriverBlockModeProc *blockModeProc;
  999.                         /* Set blocking mode for the
  1000.                                          * raw channel. May be NULL. */
  1001.     Tcl_DriverCloseProc *closeProc;    /* Procedure to call to close
  1002.                                          * the channel. */
  1003.     Tcl_DriverInputProc *inputProc;    /* Procedure to call for input
  1004.                                          * on channel. */
  1005.     Tcl_DriverOutputProc *outputProc;    /* Procedure to call for output
  1006.                                          * on channel. */
  1007.     Tcl_DriverSeekProc *seekProc;    /* Procedure to call to seek
  1008.                                          * on the channel. May be NULL. */
  1009.     Tcl_DriverSetOptionProc *setOptionProc;
  1010.                         /* Set an option on a channel. */
  1011.     Tcl_DriverGetOptionProc *getOptionProc;
  1012.                         /* Get an option from a channel. */
  1013.     Tcl_DriverWatchProc *watchProc;    /* Set up the notifier to watch
  1014.                                          * for events on this channel. */
  1015.     Tcl_DriverGetHandleProc *getHandleProc;
  1016.                     /* Get an OS handle from the channel
  1017.                                          * or NULL if not supported. */
  1018.     VOID *reserved;            /* reserved for future expansion */
  1019. } Tcl_ChannelType;
  1020.  
  1021. /*
  1022.  * The following flags determine whether the blockModeProc above should
  1023.  * set the channel into blocking or nonblocking mode. They are passed
  1024.  * as arguments to the blockModeProc procedure in the above structure.
  1025.  */
  1026.  
  1027. #define TCL_MODE_BLOCKING 0        /* Put channel into blocking mode. */
  1028. #define TCL_MODE_NONBLOCKING 1        /* Put channel into nonblocking
  1029.                      * mode. */
  1030.  
  1031. /*
  1032.  * Enum for different types of file paths.
  1033.  */
  1034.  
  1035. typedef enum Tcl_PathType {
  1036.     TCL_PATH_ABSOLUTE,
  1037.     TCL_PATH_RELATIVE,
  1038.     TCL_PATH_VOLUME_RELATIVE
  1039. } Tcl_PathType;
  1040.  
  1041. /*
  1042.  * Exported Tcl procedures:
  1043.  */
  1044.  
  1045. EXTERN void        Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1046.                 char *message));
  1047. EXTERN void        Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1048.                 char *message, int length));
  1049. EXTERN void        Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
  1050. EXTERN int        Tcl_AppendAllObjTypes _ANSI_ARGS_((
  1051.                 Tcl_Interp *interp, Tcl_Obj *objPtr));
  1052. EXTERN void        Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
  1053.                 char *string));
  1054. EXTERN void        Tcl_AppendResult _ANSI_ARGS_(
  1055.                 TCL_VARARGS(Tcl_Interp *,interp));
  1056. EXTERN void        Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
  1057.                 char *bytes, int length));
  1058. EXTERN void        Tcl_AppendStringsToObj _ANSI_ARGS_(
  1059.                 TCL_VARARGS(Tcl_Obj *,interp));
  1060. EXTERN int        Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
  1061. EXTERN Tcl_AsyncHandler    Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
  1062.                 ClientData clientData));
  1063. EXTERN void        Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
  1064. EXTERN int        Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
  1065.                 int code));
  1066. EXTERN void        Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
  1067. EXTERN int        Tcl_AsyncReady _ANSI_ARGS_((void));
  1068. EXTERN void        Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
  1069. EXTERN char        Tcl_Backslash _ANSI_ARGS_((CONST char *src,
  1070.                 int *readPtr));
  1071. EXTERN int        Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
  1072.                 char *optionName, char *optionList));
  1073. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  1074.                 Tcl_InterpDeleteProc *proc,
  1075.                 ClientData clientData));
  1076. EXTERN void        Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
  1077.                 ClientData clientData));
  1078. #define Tcl_Ckalloc Tcl_Alloc
  1079. #define Tcl_Ckfree Tcl_Free
  1080. #define Tcl_Ckrealloc Tcl_Realloc
  1081. EXTERN int        Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
  1082.                     Tcl_Channel chan));
  1083. EXTERN int        Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
  1084. EXTERN char *        Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
  1085. EXTERN Tcl_Obj *    Tcl_ConcatObj _ANSI_ARGS_((int objc,
  1086.                 Tcl_Obj *CONST objv[]));
  1087. EXTERN int        Tcl_ConvertCountedElement _ANSI_ARGS_((CONST char *src,
  1088.                 int length, char *dst, int flags));
  1089. EXTERN int        Tcl_ConvertElement _ANSI_ARGS_((CONST char *src,
  1090.                 char *dst, int flags));
  1091. EXTERN int        Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
  1092.                 Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
  1093. EXTERN int        Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
  1094.                 char *slaveCmd, Tcl_Interp *target,
  1095.                     char *targetCmd, int argc, char **argv));
  1096. EXTERN int        Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
  1097.                 char *slaveCmd, Tcl_Interp *target,
  1098.                     char *targetCmd, int objc,
  1099.                     Tcl_Obj *CONST objv[]));
  1100. EXTERN Tcl_Channel    Tcl_CreateChannel _ANSI_ARGS_((
  1101.                     Tcl_ChannelType *typePtr, char *chanName,
  1102.                             ClientData instanceData, int mask));
  1103. EXTERN void        Tcl_CreateChannelHandler _ANSI_ARGS_((
  1104.                 Tcl_Channel chan, int mask,
  1105.                             Tcl_ChannelProc *proc, ClientData clientData));
  1106. EXTERN void        Tcl_CreateCloseHandler _ANSI_ARGS_((
  1107.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  1108.                             ClientData clientData));
  1109. EXTERN Tcl_Command    Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1110.                 char *cmdName, Tcl_CmdProc *proc,
  1111.                 ClientData clientData,
  1112.                 Tcl_CmdDeleteProc *deleteProc));
  1113. EXTERN void        Tcl_CreateEventSource _ANSI_ARGS_((
  1114.                 Tcl_EventSetupProc *setupProc,
  1115.                 Tcl_EventCheckProc *checkProc,
  1116.                 ClientData clientData));
  1117. EXTERN void        Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  1118.                 ClientData clientData));
  1119. EXTERN void        Tcl_CreateFileHandler _ANSI_ARGS_((
  1120.                     int fd, int mask, Tcl_FileProc *proc,
  1121.                 ClientData clientData));
  1122. EXTERN Tcl_Interp *    Tcl_CreateInterp _ANSI_ARGS_((void));
  1123. EXTERN void        Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
  1124.                 char *name, int numArgs, Tcl_ValueType *argTypes,
  1125.                 Tcl_MathProc *proc, ClientData clientData));
  1126. EXTERN Tcl_Command    Tcl_CreateObjCommand _ANSI_ARGS_((
  1127.                 Tcl_Interp *interp, char *cmdName,
  1128.                 Tcl_ObjCmdProc *proc, ClientData clientData,
  1129.                 Tcl_CmdDeleteProc *deleteProc));
  1130. EXTERN Tcl_Interp *    Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
  1131.                     char *slaveName, int isSafe));
  1132. EXTERN Tcl_TimerToken    Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
  1133.                 Tcl_TimerProc *proc, ClientData clientData));
  1134. EXTERN Tcl_Trace    Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
  1135.                 int level, Tcl_CmdTraceProc *proc,
  1136.                 ClientData clientData));
  1137. EXTERN char *        Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
  1138.                 char *file, int line));
  1139. EXTERN int        Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
  1140.                 char *file, int line));
  1141. EXTERN char *        Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
  1142.                 unsigned int size, char *file, int line));
  1143. EXTERN void        Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
  1144.                 char *file, int line));
  1145. EXTERN void        Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
  1146.                 char *file, int line));
  1147. EXTERN int        Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj *objPtr,
  1148.                 char *file, int line));
  1149. EXTERN Tcl_Obj *    Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
  1150.                             char *file, int line));
  1151. EXTERN Tcl_Obj *    Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
  1152.                             char *file, int line));
  1153. EXTERN Tcl_Obj *    Tcl_DbNewListObj _ANSI_ARGS_((int objc,
  1154.                 Tcl_Obj *CONST objv[], char *file, int line));
  1155. EXTERN Tcl_Obj *    Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
  1156.                             char *file, int line));
  1157. EXTERN Tcl_Obj *    Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
  1158. EXTERN Tcl_Obj *    Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
  1159.                 int length, char *file, int line));
  1160. EXTERN void        Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1161.                             char *name));
  1162. EXTERN int        Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1163.                 char *cmdName));
  1164. EXTERN int        Tcl_DeleteCommandFromToken _ANSI_ARGS_((
  1165.                 Tcl_Interp *interp, Tcl_Command command));
  1166. EXTERN void        Tcl_DeleteChannelHandler _ANSI_ARGS_((
  1167.                     Tcl_Channel chan, Tcl_ChannelProc *proc,
  1168.                             ClientData clientData));
  1169. EXTERN void        Tcl_DeleteCloseHandler _ANSI_ARGS_((
  1170.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  1171.                             ClientData clientData));
  1172. EXTERN void        Tcl_DeleteEvents _ANSI_ARGS_((
  1173.                 Tcl_EventDeleteProc *proc,
  1174.                             ClientData clientData));
  1175. EXTERN void        Tcl_DeleteEventSource _ANSI_ARGS_((
  1176.                 Tcl_EventSetupProc *setupProc,
  1177.                 Tcl_EventCheckProc *checkProc,
  1178.                 ClientData clientData));
  1179. EXTERN void        Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  1180.                 ClientData clientData));
  1181. EXTERN void        Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
  1182. EXTERN void        Tcl_DeleteHashEntry _ANSI_ARGS_((
  1183.                 Tcl_HashEntry *entryPtr));
  1184. EXTERN void        Tcl_DeleteHashTable _ANSI_ARGS_((
  1185.                 Tcl_HashTable *tablePtr));
  1186. EXTERN void        Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
  1187. EXTERN void        Tcl_DeleteTimerHandler _ANSI_ARGS_((
  1188.                 Tcl_TimerToken token));
  1189. EXTERN void        Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
  1190.                 Tcl_Trace trace));
  1191. EXTERN void        Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
  1192. EXTERN void        Tcl_DontCallWhenDeleted _ANSI_ARGS_((
  1193.                 Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
  1194.                 ClientData clientData));
  1195. EXTERN int        Tcl_DoOneEvent _ANSI_ARGS_((int flags));
  1196. EXTERN void        Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
  1197.                 ClientData clientData));
  1198. EXTERN char *        Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
  1199.                 CONST char *string, int length));
  1200. EXTERN char *        Tcl_DStringAppendElement _ANSI_ARGS_((
  1201.                 Tcl_DString *dsPtr, CONST char *string));
  1202. EXTERN void        Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
  1203. EXTERN void        Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
  1204. EXTERN void        Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
  1205.                 Tcl_DString *dsPtr));
  1206. EXTERN void        Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
  1207. EXTERN void        Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
  1208.                 Tcl_DString *dsPtr));
  1209. EXTERN void        Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
  1210.                 int length));
  1211. EXTERN void        Tcl_DStringStartSublist _ANSI_ARGS_((
  1212.                 Tcl_DString *dsPtr));
  1213. EXTERN Tcl_Obj *    Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
  1214. EXTERN int        Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
  1215. EXTERN char *        Tcl_ErrnoId _ANSI_ARGS_((void));
  1216. EXTERN char *        Tcl_ErrnoMsg _ANSI_ARGS_((int err));
  1217. EXTERN int        Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
  1218.                 char *string));
  1219. EXTERN int        Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
  1220.                 char *fileName));
  1221. EXTERN void        Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
  1222.                 Tcl_FreeProc *freeProc));
  1223. EXTERN int        Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1224.                 Tcl_Obj *objPtr));
  1225. EXTERN void        Tcl_Exit _ANSI_ARGS_((int status));
  1226. EXTERN int        Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1227.                     char *hiddenCmdToken, char *cmdName));
  1228. EXTERN int        Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  1229.                 char *string, int *ptr));
  1230. EXTERN int        Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
  1231.                 Tcl_Obj *objPtr, int *ptr));
  1232. EXTERN int        Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1233.                 char *string, double *ptr));
  1234. EXTERN int        Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
  1235.                 Tcl_Obj *objPtr, double *ptr));
  1236. EXTERN int        Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
  1237.                 char *string, long *ptr));
  1238. EXTERN int        Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
  1239.                 Tcl_Obj *objPtr, long *ptr));
  1240. EXTERN int        Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
  1241.                 Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
  1242. EXTERN int        Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
  1243.                 char *string));
  1244. EXTERN void        Tcl_Finalize _ANSI_ARGS_((void));
  1245. EXTERN void        Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
  1246. EXTERN Tcl_HashEntry *    Tcl_FirstHashEntry _ANSI_ARGS_((
  1247.                 Tcl_HashTable *tablePtr,
  1248.                 Tcl_HashSearch *searchPtr));
  1249. EXTERN int        Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
  1250. EXTERN void        TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
  1251. EXTERN void        Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
  1252. EXTERN int        Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
  1253.                        char *slaveCmd, Tcl_Interp **targetInterpPtr,
  1254.                             char **targetCmdPtr, int *argcPtr,
  1255.                 char ***argvPtr));
  1256. EXTERN int        Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
  1257.                        char *slaveCmd, Tcl_Interp **targetInterpPtr,
  1258.                             char **targetCmdPtr, int *objcPtr,
  1259.                 Tcl_Obj ***objv));
  1260. EXTERN ClientData    Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1261.                             char *name, Tcl_InterpDeleteProc **procPtr));
  1262. EXTERN int        Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  1263.                 char *string, int *boolPtr));
  1264. EXTERN int        Tcl_GetBooleanFromObj _ANSI_ARGS_((
  1265.                 Tcl_Interp *interp, Tcl_Obj *objPtr,
  1266.                 int *boolPtr));
  1267. EXTERN Tcl_Channel    Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1268.                     char *chanName, int *modePtr));
  1269. EXTERN int        Tcl_GetChannelBufferSize _ANSI_ARGS_((
  1270.                     Tcl_Channel chan));
  1271. EXTERN int        Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
  1272.                     int direction, ClientData *handlePtr));
  1273. EXTERN ClientData    Tcl_GetChannelInstanceData _ANSI_ARGS_((
  1274.                     Tcl_Channel chan));
  1275. EXTERN int        Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
  1276. EXTERN char *        Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
  1277. EXTERN int        Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
  1278.                 Tcl_Channel chan, char *optionName,
  1279.                 Tcl_DString *dsPtr));
  1280. EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
  1281. EXTERN int        Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1282.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  1283. EXTERN char *        Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
  1284.                 Tcl_Command command));
  1285. EXTERN int        Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1286.                 char *string, double *doublePtr));
  1287. EXTERN int        Tcl_GetDoubleFromObj _ANSI_ARGS_((
  1288.                 Tcl_Interp *interp, Tcl_Obj *objPtr,
  1289.                 double *doublePtr));
  1290. EXTERN int        Tcl_GetErrno _ANSI_ARGS_((void));
  1291. EXTERN char *        Tcl_GetHostName _ANSI_ARGS_((void));
  1292. EXTERN int        Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1293.                 Tcl_Obj *objPtr, char **tablePtr, char *msg,
  1294.                 int flags, int *indexPtr));
  1295. EXTERN int        Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
  1296.                 char *string, int *intPtr));
  1297. EXTERN int        Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
  1298.                 Tcl_Interp *slaveInterp));
  1299. EXTERN int        Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1300.                 Tcl_Obj *objPtr, int *intPtr));
  1301. EXTERN int        Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1302.                 Tcl_Obj *objPtr, long *longPtr));
  1303. EXTERN Tcl_Interp *    Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
  1304. EXTERN CONST char *    Tcl_GetNameOfExecutable _ANSI_ARGS_((void));
  1305. EXTERN Tcl_Obj *    Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
  1306. EXTERN Tcl_ObjType *    Tcl_GetObjType _ANSI_ARGS_((char *typeName));
  1307. EXTERN int        Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
  1308.                 char *string, int write, int checkUsage,
  1309.                 ClientData *filePtr));
  1310. EXTERN Tcl_PathType    Tcl_GetPathType _ANSI_ARGS_((char *path));
  1311. EXTERN int        Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
  1312.                     Tcl_DString *dsPtr));
  1313. EXTERN int        Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
  1314.                     Tcl_Obj *objPtr));
  1315. EXTERN int        Tcl_GetServiceMode _ANSI_ARGS_((void));
  1316. EXTERN Tcl_Interp *    Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
  1317.                 char *slaveName));
  1318. EXTERN Tcl_Channel    Tcl_GetStdChannel _ANSI_ARGS_((int type));
  1319. EXTERN char *        Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
  1320.                 int *lengthPtr));
  1321. EXTERN char *        Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
  1322. EXTERN char *        Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1323.                 char *varName, int flags));
  1324. EXTERN char *        Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1325.                 char *part1, char *part2, int flags));
  1326. EXTERN int        Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  1327.                 char *command));
  1328. EXTERN int        Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1329.                 Tcl_Obj *objPtr));
  1330. EXTERN char *        Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
  1331. EXTERN int        Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1332.                     char *cmdName, char *hiddenCmdToken));
  1333. EXTERN int        Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
  1334. EXTERN void        Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  1335.                 int keyType));
  1336. EXTERN void        Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
  1337. EXTERN int        Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
  1338. EXTERN int        Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
  1339. EXTERN int        Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
  1340. EXTERN int        Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1341. EXTERN void        Tcl_InvalidateStringRep _ANSI_ARGS_((
  1342.                 Tcl_Obj *objPtr));
  1343. EXTERN char *        Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
  1344.                 Tcl_DString *resultPtr));
  1345. EXTERN int        Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1346.                 char *varName, char *addr, int type));
  1347. EXTERN int        Tcl_ListObjAppendList _ANSI_ARGS_((
  1348.                 Tcl_Interp *interp, Tcl_Obj *listPtr, 
  1349.                 Tcl_Obj *elemListPtr));
  1350. EXTERN int        Tcl_ListObjAppendElement _ANSI_ARGS_((
  1351.                 Tcl_Interp *interp, Tcl_Obj *listPtr,
  1352.                 Tcl_Obj *objPtr));
  1353. EXTERN int        Tcl_ListObjGetElements _ANSI_ARGS_((
  1354.                 Tcl_Interp *interp, Tcl_Obj *listPtr,
  1355.                 int *objcPtr, Tcl_Obj ***objvPtr));
  1356. EXTERN int        Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
  1357.                 Tcl_Obj *listPtr, int index, 
  1358.                 Tcl_Obj **objPtrPtr));
  1359. EXTERN int        Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
  1360.                 Tcl_Obj *listPtr, int *intPtr));
  1361. EXTERN int        Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
  1362.                 Tcl_Obj *listPtr, int first, int count,
  1363.                 int objc, Tcl_Obj *CONST objv[]));
  1364. EXTERN void        Tcl_Main _ANSI_ARGS_((int argc, char **argv,
  1365.                 Tcl_AppInitProc *appInitProc));
  1366. EXTERN Tcl_Channel    Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
  1367.                 int mode));
  1368. EXTERN int        Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1369. EXTERN Tcl_Channel    Tcl_MakeTcpClientChannel _ANSI_ARGS_((
  1370.                     ClientData tcpSocket));
  1371. EXTERN char *        Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
  1372. EXTERN Tcl_HashEntry *    Tcl_NextHashEntry _ANSI_ARGS_((
  1373.                 Tcl_HashSearch *searchPtr));
  1374. EXTERN void        Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
  1375.                 int mask));
  1376. EXTERN Tcl_Obj *    Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1377.                 Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
  1378.                 int flags));
  1379. EXTERN Tcl_Obj *    Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1380.                 Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
  1381.                 Tcl_Obj *newValuePtr, int flags));
  1382. EXTERN Tcl_Channel    Tcl_OpenCommandChannel _ANSI_ARGS_((
  1383.                     Tcl_Interp *interp, int argc, char **argv,
  1384.                 int flags));
  1385. EXTERN Tcl_Channel    Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1386.                     char *fileName, char *modeString,
  1387.                             int permissions));
  1388. EXTERN Tcl_Channel    Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
  1389.                 int port, char *address, char *myaddr,
  1390.                     int myport, int async));
  1391. EXTERN Tcl_Channel    Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
  1392.                     int port, char *host,
  1393.                     Tcl_TcpAcceptProc *acceptProc,
  1394.                 ClientData callbackData));
  1395. EXTERN char *        Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
  1396.                 char *string, char **termPtr));
  1397. EXTERN int        Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
  1398.                 char *name, char *version));
  1399. EXTERN char *        Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
  1400.                 char *name, char *version, int exact));
  1401. EXTERN char *        Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
  1402. EXTERN void        Tcl_Preserve _ANSI_ARGS_((ClientData data));
  1403. EXTERN void        Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1404.                 double value, char *dst));
  1405. EXTERN int        Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
  1406. EXTERN void        Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
  1407.                 Tcl_QueuePosition position));
  1408. EXTERN int        Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
  1409.                     char *bufPtr, int toRead));
  1410. EXTERN void        Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
  1411. EXTERN int        Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
  1412.                 char *cmd, int flags));
  1413. EXTERN int        Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1414.                 Tcl_Obj *cmdPtr, int flags));
  1415. EXTERN Tcl_RegExp    Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
  1416.                 char *string));
  1417. EXTERN int        Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
  1418.                 Tcl_RegExp regexp, char *string, char *start));
  1419. EXTERN int        Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
  1420.                 char *string, char *pattern));
  1421. EXTERN void        Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
  1422.                 int index, char **startPtr, char **endPtr));
  1423. EXTERN void        Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1424.                     Tcl_Channel chan));
  1425. EXTERN void        Tcl_RegisterObjType _ANSI_ARGS_((
  1426.                 Tcl_ObjType *typePtr));
  1427. EXTERN void        Tcl_Release _ANSI_ARGS_((ClientData clientData));
  1428. EXTERN void        Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
  1429. #define Tcl_Return Tcl_SetResult
  1430. EXTERN int        Tcl_ScanCountedElement _ANSI_ARGS_((CONST char *string,
  1431.                 int length, int *flagPtr));
  1432. EXTERN int        Tcl_ScanElement _ANSI_ARGS_((CONST char *string,
  1433.                 int *flagPtr));
  1434. EXTERN int        Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
  1435.                     int offset, int mode));
  1436. EXTERN int        Tcl_ServiceAll _ANSI_ARGS_((void));
  1437. EXTERN int        Tcl_ServiceEvent _ANSI_ARGS_((int flags));
  1438. EXTERN void        Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1439.                             char *name, Tcl_InterpDeleteProc *proc,
  1440.                             ClientData clientData));
  1441. EXTERN void        Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1442.                 int boolValue));
  1443. EXTERN void        Tcl_SetChannelBufferSize _ANSI_ARGS_((
  1444.                 Tcl_Channel chan, int sz));
  1445. EXTERN int        Tcl_SetChannelOption _ANSI_ARGS_((
  1446.                 Tcl_Interp *interp, Tcl_Channel chan,
  1447.                     char *optionName, char *newValue));
  1448. EXTERN int        Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1449.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  1450. EXTERN void        Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1451.                 double doubleValue));
  1452. EXTERN void        Tcl_SetErrno _ANSI_ARGS_((int err));
  1453. EXTERN void        Tcl_SetErrorCode _ANSI_ARGS_(
  1454.                     TCL_VARARGS(Tcl_Interp *,arg1));
  1455. EXTERN void        Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1456.                 int intValue));
  1457. EXTERN void        Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1458.                 int objc, Tcl_Obj *CONST objv[]));
  1459. EXTERN void        Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1460.                 long longValue));
  1461. EXTERN void        Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
  1462. EXTERN void        Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
  1463.                 Tcl_Obj *errorObjPtr));
  1464. EXTERN void        Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
  1465.                 int length));
  1466. EXTERN void        Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
  1467.                 Tcl_Obj *resultObjPtr));
  1468. EXTERN void        Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
  1469.                 _ANSI_ARGS_(TCL_VARARGS(char *, format))));
  1470. EXTERN int        Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
  1471.                 int depth));
  1472. EXTERN void        Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
  1473.                 char *string, Tcl_FreeProc *freeProc));
  1474. EXTERN int        Tcl_SetServiceMode _ANSI_ARGS_((int mode));
  1475. EXTERN void        Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
  1476.                 int type));
  1477. EXTERN void        Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1478.                 char *bytes, int length));
  1479. EXTERN void        Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
  1480. EXTERN char *        Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1481.                 char *varName, char *newValue, int flags));
  1482. EXTERN char *        Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1483.                 char *part1, char *part2, char *newValue,
  1484.                 int flags));
  1485. EXTERN char *        Tcl_SignalId _ANSI_ARGS_((int sig));
  1486. EXTERN char *        Tcl_SignalMsg _ANSI_ARGS_((int sig));
  1487. EXTERN void        Tcl_Sleep _ANSI_ARGS_((int ms));
  1488. EXTERN void        Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
  1489. EXTERN int        Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  1490.                 char *list, int *argcPtr, char ***argvPtr));
  1491. EXTERN void        Tcl_SplitPath _ANSI_ARGS_((char *path,
  1492.                 int *argcPtr, char ***argvPtr));
  1493. EXTERN void        Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
  1494.                 char *pkgName, Tcl_PackageInitProc *initProc,
  1495.                 Tcl_PackageInitProc *safeInitProc));
  1496. EXTERN int        Tcl_StringMatch _ANSI_ARGS_((char *string,
  1497.                 char *pattern));
  1498. EXTERN int        Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
  1499. #define Tcl_TildeSubst Tcl_TranslateFileName
  1500. EXTERN int        Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1501.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1502.                 ClientData clientData));
  1503. EXTERN int        Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1504.                 char *part1, char *part2, int flags,
  1505.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1506. EXTERN char *        Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
  1507.                 char *name, Tcl_DString *bufferPtr));
  1508. EXTERN int        Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
  1509.                 int len, int atHead));
  1510. EXTERN void        Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1511.                 char *varName));
  1512. EXTERN int        Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1513.                 Tcl_Channel chan));
  1514. EXTERN int        Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1515.                 char *varName, int flags));
  1516. EXTERN int        Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1517.                 char *part1, char *part2, int flags));
  1518. EXTERN void        Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1519.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1520.                 ClientData clientData));
  1521. EXTERN void        Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1522.                 char *part1, char *part2, int flags,
  1523.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1524. EXTERN void        Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
  1525.                 char *varName));
  1526. EXTERN int        Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
  1527.                 char *frameName, char *varName,
  1528.                 char *localName, int flags));
  1529. EXTERN int        Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1530.                 char *frameName, char *part1, char *part2,
  1531.                 char *localName, int flags));
  1532. EXTERN int        Tcl_VarEval _ANSI_ARGS_(
  1533.                     TCL_VARARGS(Tcl_Interp *,interp));
  1534. EXTERN ClientData    Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1535.                 char *varName, int flags,
  1536.                 Tcl_VarTraceProc *procPtr,
  1537.                 ClientData prevClientData));
  1538. EXTERN ClientData    Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
  1539.                 char *part1, char *part2, int flags,
  1540.                 Tcl_VarTraceProc *procPtr,
  1541.                 ClientData prevClientData));
  1542. EXTERN int        Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
  1543. EXTERN Tcl_Pid        Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr, 
  1544.                 int options));
  1545. EXTERN int        Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
  1546.                 char *s, int slen));
  1547. EXTERN void        Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
  1548.                 int objc, Tcl_Obj *CONST objv[], char *message));
  1549.  
  1550. #endif /* RESOURCE_INCLUDED */
  1551.  
  1552. #undef TCL_STORAGE_CLASS
  1553. #define TCL_STORAGE_CLASS DLLIMPORT
  1554.  
  1555. #endif /* _TCL */
  1556.